﻿using PMS.SANY.MonOrderServer.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PMS.SANY.MonOrderServer.Models
{
    public class OrderConfig
    {
        /// <summary>
        /// 订单类型
        /// </summary>
        public OrderType Type { set; get; }

        public Dictionary<int,List<string>> Steps { set; get; }

        public OrderConfig()
        {
            Steps = new Dictionary<int,List<string>>();
        }

        /// <summary>
        /// 获取订单工位列表
        /// </summary>
        /// <returns></returns>
        public List<string> GetStations()
        {
            List<string> stations = new List<string>();
            foreach(var st in Steps)
            {
                stations.AddRange(st.Value);
            }

            return stations;
        }
    }
}
